import {get,post} from './http.js'
import {get2,post2} from './http2.js'
class Api{
  //首页
  static async getMaxInfo() {
    return await post("v1/index")
  }
  //荣誉
  static async getHonorInfo() {
    return await post("v1/honor")
  }
  //部门介绍
  static async getServiceOne() {
    return await post("v1/department")
  }
  //成员介绍
  static async getScreenshots() {
    return await post("v1/member")
  }
  //老师信息
  static async getTeacherInfo() {
    return await post("v1/teacher")
  }
  //历史信息
  static async getHistoryInfo() {
    return await post("v1/history")
  }
  //荣誉展示
  static async getHonorList(data,params) {
    if(params){
      return await post(`v1/honor/${data.currentPage}/${data.pageSize}?honorName=`+params.honorName)
    }else{
      return await post(`v1/honor/${data.currentPage}/${data.pageSize}`)
    }

  }
  //活动展示
  static async getArticleList(data,params) {
    // if(params){
    //   return await post(`v1/honor/${data.currentPage}/${data.pageSize}?honorName=`+params.honorName)
    // }else{
      return await get2(`article/${data.currentPage}/${data.pageSize}`)
    // }

  }
  //文章详情
  static async getArticleDetail(data) {

      return await get2(`article/${data}`)

  }
}
export {
  Api
}
//get post 同时都要引入
// export const getMaxInfo = () => {
//   return  post("v1/index")
// }
